import React from 'react';
import { BrowserRouter as Router, Routes, Route } from 'react-router-dom';
import HomePage from './pages/HomePage';
import TranslationPage from './pages/translation';
import OfflineContentPage from './pages/offline-content.tsx';
import SettingsPage from './pages/settings';
import GuidePage from './pages/guide';
import MapPage from './pages/map';
import ProfilePage from './pages/profile.tsx';

import './globals.css';

declare global {
  interface Window {
    __REDUX_DEVTOOLS_EXTENSION__?: () => any;
  }
}

const App: React.FC = () => {
  return (
    <Router>
      <div className="min-h-screen bg-gray-50">
        <Routes>
          <Route path="/" element={<HomePage />} />
          <Route path="/translation" element={<TranslationPage />} />
          <Route path="/offline-content" element={<OfflineContentPage />} />
          <Route path="/settings" element={<SettingsPage />} />
          <Route path="/guide" element={<GuidePage />} />
          <Route path="/map" element={<MapPage />} />
          <Route path="/profile" element={<ProfilePage />} />

          {/* 可以添加更多路由 */}
          <Route path="*" element={<HomePage />} />
        </Routes>
      </div>
    </Router>
  );
};

export default App;